package com.zhentao.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhentao.model.article.dto.ArticleHomeDto;
import com.zhentao.model.article.pojo.ApArticle;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface ArticleMapper extends BaseMapper<ApArticle> {


    /**
     * @param articleHomeDto
     * @param type 加载类型  默认 向上滚动 向下滚动
     * @return
     */
    List<ApArticle> loadArticleList(@Param("dto") ArticleHomeDto articleHomeDto,
                                    @Param("type") Short type);
    public List<ApArticle> findArticleListByLast5days(@Param("dayParam") Date dayParam);
}
